#include "e2d/yml/trans/Serializer.h"

using Serializer = e2d::BasicSerializer;

template<>
 void Serializer::Encode<e2d::LayoutGrid>(YAML::Node& node, const e2d::LayoutGrid& inst)
{
	Encode<e2d::Object>(node, inst);

	SetVariable<glm::ivec3>(node, "m_NumSep", inst.m_NumSep);
	SetVariable<glm::vec3>(node, "m_SepSize", inst.m_SepSize);
}


template<>
 bool Serializer::Decode<e2d::LayoutGrid>(const YAML::Node& node, e2d::LayoutGrid& inst)
{
	Decode<e2d::Object>(node, inst);

	GetVariable<glm::ivec3>(node, "m_NumSep", inst.m_NumSep);
	GetVariable<glm::vec3>(node, "m_SepSize", inst.m_SepSize);

	return true;
}
